<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a>分销用户列表</a></li>
			<li><a href="{:U('indexlinks/add')}">添加终端</a></li>
		</ul>
		<form class="well form-search" method="post" action="">
			终端： 
			<input type="text" name="name" style="width: 200px;" value="{:I('request.name')}" placeholder="终端">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="">清空</a>
		</form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th align="center">终端</th>
						<th>用户</th>
						<th>创建时间</th>
						<th>短链接</th>
						<th>长链接</th>
						<th>状态</th>
						<th align="center">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<php>$user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));</php>
					<foreach name="list" item="vo">
					<tr>
						<td align="center">{$vo.name}</td>
						<td>{$users[$vo['user_id']]}</td>
						<td>{$vo.crtime}</td>
						<td>{$vo.short}</td>
						<td>{:C('JUMP_URL_OTHER')}?app_act=links&merchantCode={$vo.code}&rcmdNetCode={$vo.code}</td>
						<td>{$vo['is_start']==1?'开启':'关闭'}</td>
						<td align="center">
						<if condition="($vo['is_start'] eq 1)">
						<a href="{:U('indexlinks/is_ban',array('id'=>$vo['id'],'type'=>0))}" class='js-ajax-dialog-btn' data-msg="确认关闭?">关闭</a>
						<else/>
						<a href="{:U('indexlinks/is_ban',array('id'=>$vo['id'],'type'=>1))}" class='js-ajax-dialog-btn' data-msg="确认开启?">开启</a>
						</if>
						<a href="{:U('indexlinks/del',array('id'=>$vo['id']))}" class='js-ajax-dialog-btn' data-msg="确认删除?">删除</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>